package com.example.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 讲座响应DTO
 * 用于返回讲座详细信息
 */
@Data
@Schema(description = "讲座响应数据传输对象")
public class LectureResponseDTO {

    @Schema(description = "讲座ID", example = "1001")
    private Long id;

    @Schema(description = "讲座标题", example = "Java并发编程实战")
    private String title;

    @Schema(description = "主讲人", example = "张教授")
    private String lecturer;

    @Schema(description = "讲座描述", example = "深入探讨Java并发编程的核心概念和实践技巧")
    private String description;

    @Schema(description = "开始时间", example = "2025-08-25 14:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @Schema(description = "结束时间", example = "2025-08-25 16:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @Schema(description = "地点", example = "图书馆多功能厅")
    private String location;

    @Schema(description = "人数限制", example = "50")
    private Integer participantLimit;

    @Schema(description = "讲座类型", example = "技术分享")
    private String lectureType;

    @Schema(description = "报名开始时间", example = "2025-08-20 09:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registrationStartTime;

    @Schema(description = "报名结束时间", example = "2025-08-24 18:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registrationEndTime;

    @Schema(description = "讲座状态", example = "0")
    private Integer lectureStatus;

    @Schema(description = "讲座状态文本", example = "未开始")
    private String lectureStatusText;

    @Schema(description = "当前报名人数", example = "25")
    private Long currentRegistrations;

    @Schema(description = "剩余名额", example = "25")
    private Object availableSlots; // 可能是数字或"无限制"

    @Schema(description = "是否已满员", example = "false")
    private Boolean isFull;

    @Schema(description = "签到率", example = "80.0%")
    private String checkInRate;

    @Schema(description = "创建时间", example = "2025-08-20 10:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @Schema(description = "更新时间", example = "2025-08-20 15:30:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
}